<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="multipart/form-data; charset=utf-8" />
    <title>个人中心</title>
    <link rel="stylesheet" href="../css/personal-center.css"/>
    <script type="text/javascript" src="../js/personal-center.js"></script>
</head>

<body>
<!--****************顶部导航************-->
<%@include file="../jsp/common/nav.jsp"%>
<!--*******************个人中心**********************-->
<!--标题导航-->
<div class="personal-nav">
    <span class="personal-nav-title"><a href="#"><c:set var="user" value="${sessionScope.user}"/>${user.username}</a></span>
    >
    <span>编辑个人资料</span>
</div>
<!--头像-->
<div class="logo">
    <div class="logo-title">
        <h3>公开头像</h3>
        <span>您可以在这里修改或删除头像。</span>
    </div>
    <div class="logo-img">
        <div class="logo-img-item">
            <img src="../images/${user.userLogo}.jpg"/>
        </div>
        <div class="logo-item">
            <form action="/users/upload-Image" enctype="multipart/form-data" method="post">
                <input type="hidden" name="id" value="${user.id}">
                <h4>公开头像</h4>
                <input type="file" value="选择图片" name="file"/>
                <div class="logo-item-detail">仅支持 jpg, jpeg, png 格式的图片类型。图片允许的最大大小为2MB。</div>
                <div class="button">
                    <input type="submit" id="submit" value="保存头像" />
                </div>
            </form>
        </div>
    </div>
</div>
<!--个人信息-->
<div class="personal">
    <div class="personal-left">
        <h3>个人信息</h3>
        <span>您可以在这里修改或删除头像。</span>
    </div>
    <div class="personal-right">
        <form action="/users/update-user">
            <ul>
                <input type="hidden" name="id" value="${user.id}">
                <li><h4>昵称：</h4></li>
                <li><input type="text" size="70" name="username" value="${user.username}"/></li>
                <li><h4>邮箱：</h4></li>
                <li><input type="text" size="70" name="email" value="${user.email}"/></li>
                <li><h4>身份：</h4></li>
                <li>
                    <c:if test="${user.status=='2'}">
                        <input type="radio" name="status" checked="checked" value="2"/>空间创造者
                        <input type="radio" name="status" value="1"/>无身份
                    </c:if>
                    <c:if test="${user.status=='1'}">
                        <input type="radio" name="status" value="2"/>空间创造者
                        <input type="radio" name="status" checked="checked" value="1"/>无身份
                    </c:if>
                </li>
                <li><h4>个人主页：</h4></li>
                <li><input type="text" size="70" name="information" value="${user.information}"/></li>
                <li><h4>个人简介：</h4></li>
                <li><textarea cols="65" rows="5" name="introduce">${user.introduce}</textarea></li>
            </ul>
            <input type="submit" id="sumbit" value="更新个人信息"/>
        </form>
    </div>
</div>
</body>
</html>
